#!/usr/bin/sed -rf
# $Id: fixscript.sed 9227e81e919a 2012/08/27 15:49:57 pgurumur $
# Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# File fixscript.sed generated on Saturday August 25, 2012 @ 17:06:40 PDT
#

# __version__  = "$Revision: 9227e81e919a $"
# __author__   = "$Author: pgurumur $"
# __modified__ = "$Date: 2012-08-27 15:49:57Z $"

# Range 1,1 only inserts the file only once
# Insert license, version, author and modified tags for python
1,1 {/env python2.6$|python3$|python/a\
# \$Id\$\
# Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>\
#\
# Permission to use, copy, modify, and distribute this software for any\
# purpose with or without fee is hereby granted, provided that the above\
# copyright notice and this permission notice appear in all copies.\
#\
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
#\
\
__version__  = "\$Revision\$"\
__author__   = "\$Author\$"\
__modified__ = "\$Date\$"
}

1,1 {/import|try|from|^$/i\
# \$Id\$\
# Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>\
#\
# Permission to use, copy, modify, and distribute this software for any\
# purpose with or without fee is hereby granted, provided that the above\
# copyright notice and this permission notice appear in all copies.\
#\
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
#\
\
__version__  = "\$Revision\$"\
__author__   = "\$Author\$"\
__modified__ = "\$Date\$"\

}

# Insert license, version, author and modified tags for perl, awk, sed and bc
1,1 {/env perl$|awk -f$|sed -f$|env bc$|tclsh|bc|sh/a\
# \$Id\$\
# Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>\
#\
# Permission to use, copy, modify, and distribute this software for any\
# purpose with or without fee is hereby granted, provided that the above\
# copyright notice and this permission notice appear in all copies.\
#\
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
#\
\
# __version__  = "\$Revision\$"\
# __author__   = "\$Author\$"\
# __modified__ = "\$Date\$"
}

# Insert license, version, author and modified tags for c and cpp files
1,1 {/#include|#ifndef/i\
/*\
 * \$Id\$\
 * Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>\
 *\
 * Permission to use, copy, modify, and distribute this software for any\
 * purpose with or without fee is hereby granted, provided that the above\
 * copyright notice and this permission notice appear in all copies.\
 *\
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
 *\
\
 * __version__  = "\$Revision\$"\
 * __author__   = "\$Author\$"\
 * __modified__ = "\$Date\$"\
 */
}

# Insert license, version, author and modified tags for lua files
1,1 {/env lua$/i\
--\
-- \$Id\$\
-- Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>\
--\
-- Permission to use, copy, modify, and distribute this software for any\
-- purpose with or without fee is hereby granted, provided that the above\
-- copyright notice and this permission notice appear in all copies.\
--\
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
--\
\
-- __version__  = "\$Revision\$"\
-- __author__   = "\$Author\$"\
-- __modified__ = "\$Date\$"
}
